package kr.hkit.powerjava.chapter08;

public class Time {
	private int hour;
	private int minute;
	private int second;
	
	public void setTimes(int hour, int minute, int second) {
		this.hour = (hour < 0 || hour >24? 0 : hour);
		this.minute = (minute < 0 || minute >60? 0 : minute);
		this.second = (second < 0 || second >60? 0 : second);
	}
	
	@Override
	public String toString() {
		return "Time [hour=" + hour + ", minute=" + minute + ", second="
				+ second + "]";
	}
	
	
	

}
